Pursuant to 35 U.S.C. 119, Applicants claim the benefits of Japanese Application No. 10-347278, which was filed of Dec. 7, 1998. This Japanese patent application and its translation are incorporated into this application by reference.
This invention relates to a technique for dynamically controlling power consumption of an electronic apparatus such as a computer or the like and, more particularly, to a method and an apparatus for use in a computer, which is provided with loads such as a central processing unit (CPU) and/or a display device each with its power consumption being adjustable, to dynamically control power consumption of a portion of the loads in accordance with a predicted result of maximum power consumption of the computer, thereby to limit its power consumption to a predetermined value or less.
In general, a portable computer (hereinafter simply called xe2x80x9ccomputerxe2x80x9d) has a smaller size and a lighter weight to enrich its portability and, thus, so long as it is equipped with a battery pack, it is adapted for use in any location where no AC power supply is available. Conversely, in a location where an AC power supply is available, an AC power adapter (hereinafter called xe2x80x9cAC adapterxe2x80x9d) is normally connected to an electric outlet of a commercial power supply for feeding DC power to system loads within the computer and for recharging its internal batteries. Thus, a user may bring an AC adapter whenever he/she carries his/her computer. Recently, functions and performance of a portable computer are being dramatically enhanced, and this results in a continuous increase in power consumption of a computer. Keeping pace with such a trend, capacity of an AC adapter is inclined to increase as well. Obviously, such an inclination is unfavorable to a portable computer that attaches importance to its portability.
Japanese Patent Publication No. 5-241769 discloses a technique for controlling maximum power consumption of a computer, whereby brightness of a display device of the computer may be increased to its maximum level within capacity of a given AC adapter. In this technique, when a user adjusts brightness of a liquid crystal display (LCD) to cause its load current to be changed, a charge control circuit is responsive thereto for automatically controlling charging time, thereby adjusting a current of the circuit. As a result, a sum of the currents for the LCD and charge control circuit is so controlled as not to exceed the capacity of the AC adapter, whereby the user is allowed to freely change the brightness within an adjustable range of the charging time.
With this technique, however, the charging time corresponding to the brightness of the LCD is so set up previously as not to exceed the capacity of the AC adapter, and when the user selects the brightness or power consumption of the LCD to be a certain value., the charging time or power consumption of the charge control circuit is caused to be adjusted accordingly. Since there exist one or more loads in the computer (which constitute the computer system) besides the LCD and the charge control circuit, power to be consumed thereby is fed from the AC adapter as well. Also, power consumption of the entire system load varies, depending on or in accordance with a particular operation being carried out by the computer. For example, when a CD-ROM drive is being accessed for reproducing any animation on the LCD, a larger amount of power is consumed, whereas in another case of creating a document with static images alone, a smaller amount of power is consumed.
In said technique, on a premise that power consumption of the system load is always equated with maximum power consumption, a combination of power consumption of the LCD and the charge control circuit has been set up such that power consumption of the entire computer is confined within the capacity of the AC adapter. However, since actual power consumption of the system load varies in accordance with an operating state of the computer as mentioned above, it is far less than the maximum power consumption. As a result, there occurs a waste of the capacity of the AC adapter in proportion to a difference between the maximum power consumption of the system load and actual power consumption. Further, this technique does not disclose any means for predicting the maximum power consumption of the computer, nor does it disclose any means for dynamically adjusting power consumption of a load in accordance with the predicted result.
Therefore, it is an object of this invention to provide a method and an apparatus for predicting maximum power consumption of an electronic apparatus and for dynamically controlling power consumption of a portion of its loads in response to the predicted result, thereby to limit its power consumption to a predetermined value or less.
It is another object of this invention to provide a method and an apparatus for predicting maximum power consumption of a computer and for temporarily changing a function of its CPU or LCD in response to the predicted result while the computer is operating to control its power consumption, thereby limiting its power consumption to a predetermined value or less.
It is yet another object of this invention to provide a method and an apparatus adapted for use in an electronic apparatus, which is fed power by a given AC adapter, for effectively making use of capacity of the adapter without needlessly increasing the capacity thereof.
Power consumption of an electronic apparatus such as a computer or the like varies in accordance with a type of its processed data or an operating state. This invention may be applied to an electronic apparatus, which includes a load with its power consumption being adjustable (hereinafter called xe2x80x9ccontrolled loadxe2x80x9d) and a set of loads comprising a plurality of components (hereinafter called xe2x80x9cbase loadsxe2x80x9d). The controlled load has a plurality of operation modes corresponding to functional levels in such a manner that when the operation modes are switched or changed from one to another, maximum power consumption of the controlled load and its actual power consumption are varied accordingly. On the other hand, actual power consumption of the base loads is, in general, far less than a sum of maximum power consumption of each component, and this power consumption varies as a result of a change in an operating state of the electronic apparatus.
In one aspect of this invention, there is provided a method of controlling power consumption of a computer, which is provided with base loads comprising a plurality of components, and a CPU including a plurality of operation modes associated with power consumption thereof, the method comprising the steps of: obtaining predicted maximum power consumption of said computer from actual power consumption of said base loads and maximum power consumption in a current operation mode of said CPU; providing reference power; comparing said predicted maximum power consumption with said reference power; and changing the operation mode of said CPU in response to said comparing step. It is clear from the description of the present specification, however, that application of this invention is not limited to controlling of power consumption of a computer, since this invention is broadly applicable to controlling of power consumption of a conventional electronic apparatus as well. Also, the load including a plurality of operation modes associated with power consumption thereof is not limited to a CPU alone, since it may be any load so long as its power consumption is changeable, i.e., any member of the so-called xe2x80x9ccontrolled loadsxe2x80x9d. Note here that the expression, xe2x80x9coperation modes associated with power consumptionxe2x80x9d, refers to one or more operation modes of intermediate states (each being capable of consuming a certain amount of power) between the most active operation mode (wherein the controlled load consumes its maximum power) and the most inactive operation mode (wherein the controlled load is stopped), and that upon setting one of the operation modes, maximum power consumption in this operation mode so set up is determined, thereby to confine its actual power consumption within the said maximum power consumption.
A CPU runs in synchronization with timing of clocks. Thus, a program can be executed even if clocks are not successively sent at a predetermined frequency. Recognizing such behavior, there has been developed a known technique of an operation mode, called xe2x80x9cthrottlingxe2x80x9d, for controlling power consumption and/or a temperature rise by periodically stopping clocks of the CPU for a predetermined time interval. Changing a duty cycle of the throttling, maximum power consumption of the CPU can be controlled accordingly. Also, in a normal state of CMOS transistor circuit within the CPU, there is little current flowing through it. In other words, most of the current flows in synchronization with clock timing if and only if a combination of input signals to the circuit is changed. Recognizing such behavior, there has been developed another known technique of an operation mode, called xe2x80x9cclock-downxe2x80x9d, for controlling power consumption and/or a temperature rise by controlling operating frequencies of the CPU. While a processing rate of a program is degraded as a result of executing the throttling and/or the clock-down, nevertheless it is possible to reach at a tradeoff between such a performance degradation and a decrease of power consumption of the CPU.
Also, there is another known technique of an operation mode, called xe2x80x9cstandbyxe2x80x9d, for reducing power consumption by stopping clock feeding to arithmetic units and the like (except a portion of peripheral circuits such as an interrupt circuit, a timer circuit, and the like) while contents of registers are being kept therein. Further, there is another known technique of an operation mode, called xe2x80x9csuspendxe2x80x9d, for reducing power consumption by causing most of the devices (except a memory, an interrupt circuit, and the like) to be stopped while an execution state of a program is being saved to the memory. When an operation of a computer is to be started from the suspend state, the computer can be returned to an operating state immediately before the suspend state in a short period of time, since the memory saves the operating state just before the suspend state. This is called xe2x80x9cresumexe2x80x9d. Relatedly, there is a known technique, called xe2x80x9chibernationxe2x80x9d, for completely stopping a computer by storing such a state immediately before stoppage of a CPU into an auxiliary storage device and by stopping a memory as well. Note in this respect that this invention makes is capable of exploiting a variety of operation modes in a CPU as described above, in addition to any technique for controlling maximum power consumption and actual power consumption of a CPU by means of dynamically changing its operation modes.
The predicted maximum power consumption is obtained from actual power consumption of the base loads and maximum power consumption in a current operation mode of the controlled load or CPU. While actual power consumption of the CPU varies heavily or widely in accordance with a type of an executing program and its execution state, maximum power consumption of the CPU is determined by its operation mode. On the other hand, actual power consumption of the base loads varies in accordance with addition of one or more peripheral devices (e.g., a PCMCIA card, an auxiliary storage device, and the like) to the computer, as well as a change in their operating states, but its variation while the computer is operating is not heavy as much as that of the CPU. Thus, even if power consumption of the CPU varies widely, a summed value of actual power consumption of the base loads and maximum power consumption in a current operation mode of the CPU has significance as a predicted value of maximum power consumption of the computer. Note in this respect, however, that the predicted maximum power consumption of this invention is not necessarily obtained by simply adding actual power consumption of the base loads and maximum power consumption in a current operation mode of the CPU. This is because it can be similarly obtained by all of possible calculation methods, including but not limited to introduction of an experimental factor and/or exploitation of another logical operation, which make use of actual power consumption of the base loads and maximum power consumption in a current operation mode of the CPU for calculating the predicted maximum power consumption.
The reference power, which is set up to have a value associated with allowable power of the electronic apparatus or the computer, is utilized for changing the operation modes of the CPU from one to another. Alternatively, the reference power may be arranged to have a plurality of values corresponding to the operation modes of the CPU. Namely, if the CPU is running in one of the operation modes that requires a larger amount of maximum power consumption, then a smaller value of the reference power may be applied to change this operation mode. Conversely, if the CPU is running in another operation mode that requires a smaller amount of maximum power consumption, then a larger value of the reference power may be applied to change this operation mode. Further, the reference power may be arranged to have different values, each being respectively associated with a first case (wherein power consumption of the base loads increases, thereby changing the operation modes of the CPU in such a direction as to decrease its maximum power consumption toward a smaller amount) and a second case (wherein power consumption of the base loads decreases, thereby changing the operation modes of the CPU in such a direction as to increase its maximum power consumption toward a larger amount). Obviously, the reference power may include a margin to prevent power consumption of the computer from exceeding the allowable power because of an unexpected sudden increase in the base loads.
Comparing the predicted maximum power consumption with the reference power, it is possible to determine whether or not actual power consumption of the computer possibly exceeds the reference power. If the predicted maximum power consumption is equal to or less than the reference power, actual power consumption of the computer does not exceed the reference power, so long as actual power consumption of the base loads does not suddenly increase. This is true even when power consumption of the CPU suddenly increases. A value of the reference power is different for each type of the allowable power of the computer. For example, in a case of feeding power to the computer from an AC adapter, it is possible to set up a value associated with capacity of the AC adapter. Alternatively, it is possible to set up a value associated with an operational value of a safety device in an electric system and/or a limit of a temperature rise.
If, as a result of said comparison, the predicted maximum power consumption is determined to exceed the reference power, then the operation mode of the CPU is changed from one to another. For example, if the CPU is running in a normal operation mode consuming a larger amount of actual power consumption, and if the predicted maximum power consumption exceeds the reference power due to an increase of actual power consumption of the base loads, then the CPU is changed to the throttling mode. In general, actual power consumption of the CPU is smaller than maximum power consumption of its operation mode and, thus, actual power consumption of the computer does not exceed the reference power nor the allowable power. Accordingly, by means of changing the operation modes, maximum power consumption of the CPU is decreased and, at the same time, the predicted maximum power consumption is caused to be lowered than the reference power. Thus, so long as actual power consumption of the base loads does not suddenly increase, actual power consumption of the computer does not exceed the allowable power.
Causing maximum power consumption of the CPU to be decreased as a result of changing its operation modes, it leads to a degradation of a function of the CPU. Thus, in a case where the base loads are decreased to cause the predicted maximum power consumption to be lowered sufficiently below the reference power, it is preferable to recover the function by changing the operation modes of the CPU from the throttling mode to the normal operation mode. This results in an increase in maximum power consumption of the entered normal operation mode of the CPU. In this way, by changing the operation modes of the CPU in response to a comparison result of the predicted maximum power consumption and reference power for controlling both of maximum power consumption and actual power consumption of the CPU, it is possible to provide the computer that is operable at its actual power consumption maintained to be lower than the allowable power without needlessly degrading the function of the CPU.
In another aspect of this invention, when maximum power consumption is determined to exceed the reference power as a result of said comparison, brightness of a display device is adjusted. Power consumption of the display device such as an LCD varies in accordance with a change in its brightness. Accordingly, by decreasing the brightness in accordance with an increase in power consumption, and by limiting a user""s brightness adjustment, it is possible to control power consumption of the computer.
Yet another aspect of this invention comprises a step of changing the operation modes of the CPU from one to another, when a sum of actual power consumption of the base loads and actual power consumption of the CPU exceeds the reference power of the computer. Even though the predicted maximum power consumption is so controlled as not to exceed the reference power, if there is a sudden change in the base loads, it may happen that actual power consumption of the computer exceeds both of the reference power and the allowable power. In such a case, depending on a type of the allowable power, occurrence of a problem may be prevented by lowering the actual power consumption below the allowable power in a short period of time. For example, when capacity of an AC adapter is selected to be the allowable power, it is preferable to select such an AC adapter that can tolerate overloading of a short period.
In another aspect of this invention, there is provided a method adapted for use in a computer, which is provided with a display device with its brightness being adjustable, for more securely limiting its power consumption to the reference power or less. While an exemplary display device is an LCD, the scope of this invention includes, but not limited to the LCD alone, any display devices for a computer as long as its power consumption varies as a result of its brightness adjustment. As known in the art, the brightness of the LCD may be appropriately changed by a user at any time, and an increase in the brightness leads to a sudden increase in power consumption of the LCD. Thus, if the predicted maximum power consumption is previously calculated from maximum power consumption of the LCD at the time of adjusting its brightness to the maximum level, actual power consumption of other base loads, and maximum power consumption in a current operation mode of the CPU, then it is possible to control in such a way that actual power consumption of the computer does not exceed the allowable power.